import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


public class ControleurControleVideo implements ActionListener {
	private ModelIHM monModelIHM;
	
	public ControleurControleVideo()
	{
		super();
	}
	public void actionPerformed(ActionEvent e) {
		String cmd = e.getActionCommand();
		int temp;
		switch (cmd) {
		case "Haut":
			System.out.println("Haut");
			temp = monModelIHM.getModelControleVideo().getLattitude() + 1;
			monModelIHM.getModelControleVideo().setLattitude(temp);
			break;
		case "Bas":
			System.out.println("Bas");
			temp = monModelIHM.getModelControleVideo().getLattitude() - 1;
			monModelIHM.getModelControleVideo().setLattitude(temp);
			break;
		case "Droite" :
			System.out.println("Droite");
			temp = monModelIHM.getModelControleVideo().getLongitude() + 1;
			monModelIHM.getModelControleVideo().setLongitude(temp);
			break;
		case "Gauche":
			System.out.println("Gauche");
			temp = monModelIHM.getModelControleVideo().getLongitude() - 1;
			monModelIHM.getModelControleVideo().setLongitude(temp);
			break;

		default:
			break;
		}

	}
	public void setModelIHM(ModelIHM mIHM){
		monModelIHM = mIHM;
		
	}

}
